package com.huaxin.hxmoduleworkorder.dto.request;

import com.huaxin.hxmoduleworkorder.common.annotation.validation.ValidInspectionOrderItemResultStatus;
import com.huaxin.hxmoduleworkorder.common.enums.InspectionOrderItemResultStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.util.List;

@Data
public class InspectionOrderItemUpdateReqDTO {
    @Schema(description = "巡检项ID，主键，用于定位更新目标", example = "ins_item_123")
    @NotBlank(message = "巡检项ID不能为空")
    private String id;

    @Schema(description = "实际值，可为文本或拍照路径", example = "218V")
    @Size(max = 500, message = "实际值长度不能超过500个字符")
    private String actualValue;

    @Schema(description = "检查结果状态：pending（待检查）/normal（正常）/abnormal（异常）", example = "normal")
    @NotBlank(message = "检查结果状态不能为空")
    @ValidInspectionOrderItemResultStatus
    private InspectionOrderItemResultStatus resultStatus;

    @Schema(description = "备注或问题描述", example = "电压偏低，建议检查线路")
    @Size(max = 1000, message = "备注长度不能超过1000个字符")
    private String remarks;
    
    @Schema(description = "备注图片URL列表", example = "[\"https://oss/1.jpg\",\"https://oss/2.jpg\"]")
    private String remarkImages;

    @Schema(description = "照片URL列表，用于拍照类检查项", example = "[\"https://oss/1.jpg\",\"https://oss/2.jpg\"]")
    private List<String> photoUrls;
}